import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login.vue'
import OrderManage from '../views/homepage/OrderManage.vue'



Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: login
  },
  {
    path: '/home',
    name: 'home',
    redirect:'/OrderManage',
    component: function () {
      return import('../views/home.vue')
    },
    children:[
      {
        path: '/OrderManage',
        name: '订单管理',
        component: OrderManage
      },
    ]
    
  }
]

const router = new VueRouter({
  routes
})

export default router
